using System;
using UnityEngine;

namespace Flaschengeist.Views 
{
	public class CreditsView : BaseView
	{
		private Texture2D header;
		private Texture2D background;
		private Texture2D activeButton;
		private GUISkin skin;
		
		public void Start()
		{
			skin = (GUISkin)Resources.Load (Settings.GUI_SKIN_SMALL_TEXT);
			header = (Texture2D)Resources.Load("textures/gui_creditsHeader");
			background = (Texture2D)Resources.Load("textures/gui_menuBackground");
		}
		
		public void OnGUI()
		{
			if (IsActive)
			{
				GUI.skin = skin;	
				GUI.DrawTexture(new Rect(Screen.width/2 - 163, Screen.height/2 - 125, 326, 310),background);
				GUI.DrawTexture(new Rect(Screen.width/2 - 163, Screen.height/2 - 250, 326, 198),header);
				
				GUI.Label(new Rect(Screen.width/2 - 90, Screen.height/2 - 50, 300, 250), 	"Version 1.0 Beta \n" + 
																							"-----------------------------------------\n" +
																							"developed with Unity Engine\n\n" +
																							"programming/design:\nGamesauger\n\n" +
																							"programming/graphics:\nOOLEderGSbfmeb\n\n" +
																							"(c) 2013 HBG Studios\n" +
																							"www.clan-hbg.de");
				
				if (GUI.Button(new Rect(Screen.width/2 - Settings.GUI_BUTTON_WIDTH/2, Screen.height/2 + 130, Settings.GUI_BUTTON_WIDTH, Settings.GUI_BUTTON_HEIGHT), "back"))
				{
					Hide();
					Close();
				}
			}
		}
	
		public event Action Close;
	}
}

	